package io.lvdaxian.mybatis08.scripting.xmltags;

import io.lvdaxian.mybatis08.mapping.SqlSource;
import io.lvdaxian.mybatis08.scripting.LanguageDriver;
import io.lvdaxian.mybatis08.session.Configuration;
import org.dom4j.Element;

/**
 * xml 语言驱动
 *
 * @author lihh
 */
public class XMLLanguageDriver implements LanguageDriver {
  
  @Override
  public SqlSource createSqlSource(Configuration configuration, Element script, Class<?> parameterType) {
    XMLScriptBuilder xmlScriptBuilder = new XMLScriptBuilder(configuration, script, parameterType);
    return xmlScriptBuilder.parseScriptNode();
  }
}
